package com.ayf.payment.game.api.dto.criteria;

import com.swwx.charm.commons.lang.base.BasicTO;

/**
 * @Description: 分页
 * @Author: zh-liang
 * @Date : 2019-12-04 15:06
 */
public class PageCriteria extends BasicTO {
    private static final long serialVersionUID = 1L;
    private int pageNum;
    private int pageSize;

    public int getPageNum() {
        return Math.max(pageNum, 1);
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize > 0 ? pageSize : 10;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
